/* cWindow.h
 * Base class for all windows.
 */
#ifndef __newmoon_cwindow_h
#define __newmoon_cwindow_h

class Window;
#include <list>
#include <string>
#include <gtk/gtk.h>
#include "debugout.h"
#include "compat.h"
#include "mathx.h"
#include "uint.h"

class Window {
	public:
		Window();
		Window(std::string Title);
		Window(u32 Width, u32 Height);
		Window(std::string Title, u32 Width, u32 Height);
		~Window();
		
		void SetSize(u32 Width, u32 Height);
		void SetTitle(std::string Title);
		u32 GetWidth();
		u32 GetHeight();
		std::string GetTitle();
		GtkWindow* GetGTKWin();
	
	protected:
		static std::list<Window*> Instances;
		GtkWindow *GTKWin;
		std::string Title;
		
		void _Create(std::string Title, u32 Width, u32 Height);
	
	private:
		friend Window* LookupWindow(GtkWindow *Win);
};

Window* LookupWindow(GtkWindow *Win);
#endif //__newmoon_cwindow_h
